<template>
  <ICountUp :endVal="endVal" :options="options" @ready="onReady"></ICountUp>
</template>
<script>
import ICountUp from "vue-countup-v2";
export default {
  name: "countUp",
  data() {
    return {};
  },
  props: {
    endVal:{
      default:'',
      type:Number
    },
    options: {
      useEasing: true,
      useGrouping: true,
      separator: ",",
      decimal: ".",
      prefix: "",
      suffix: ""
    }
  },
  components: { ICountUp },
  methods: {
    onReady(instance, CountUp) {
      instance.update(this.endVal);
    }
  }
};
</script>

<style lang="stylus" scoped>
.iCountUp {
  font-size: 12em;
  margin: 0;
  color: black;
}
</style>